﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IHISCETeim.DAL;
using IHISCETeim.Model;
using IHISCETeim.Library;
using System.Data;


namespace IHISCETeim.BLL
{
    public class PartsDebtController : BaseController
    {
        public static int Add(PartsDebtInfo obj)
        {
            return PartsDebtDAL.Add(obj);
        }
        public static bool Delete(int DebtId)
        {
            return PartsDebtDAL.Delete(DebtId);
        }
        public static PartsDebtInfo GetById(int DebtId)
        {
            PartsDebtInfo _obj = null;
            _obj =CBO.FillObject<PartsDebtInfo>( PartsDebtDAL.GetById(DebtId));
            if (_obj == null)
                _obj = new PartsDebtInfo();
            return _obj;
        }
        public static DataTableCollection GetPagination(string whereSql, int PageIndex, int PageSize, string Sort, ref int TotalCount)
        {
            return PartsDebtDAL.GetPagination(whereSql, PageIndex, PageSize, Sort, ref TotalCount);
        }

        public static DataTableCollection PartsDebtReport1(string SaleDateFrom, string SaleDateTo, string YuQiDate)
        {
            return PartsDebtDAL.PartsDebtReport1(SaleDateFrom, SaleDateTo, YuQiDate);
        }
   }
}
